var _o73;
var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ePlatformType = undefined;
var $2PTConfig = require("PTConfig");
var Adv_skd=require("./Adv_skd");
var a;
(function (e) {
  e[e.Pc = 0] = "Pc";
  e[e.TTGame = 1] = "TTGame";
  e[e.WXGame = 2] = "WXGame";
  e[e.KWaiGame = 3] = "KWaiGame";
  e[e.QQGame = 4] = "QQGame";
  e[e.OPPOGame = 5] = "OPPOGame";
  e[e.VIVOGame = 6] = "VIVOGame";
  e[e.ZFBGame = 7] = "ZFBGame";
  e[e.BLGame = 8] = "BLGame";
  e[e.IOS_WEB = 9] = "IOS_WEB";
  e[e.Pc_ZhiBo = 10] = "Pc_ZhiBo";
  e[e.Pc_DuanShiPing = 11] = "Pc_DuanShiPing";
  e[e.Android = 12] = "Android";
})(a = exports.ePlatformType || (exports.ePlatformType = {}));
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var c = cc.sys.platform;
var def_Platformconf = _o73 = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
    this._config = null;
  }
  return babel_createClass(_ctor, [{
    key: "platformType",
    value: function platformType() {
      if (cc.sys.isBrowser) {
        var _e32 = window.getPlatformType;
        null != _e32 && "" != _e32 && null != _e32 || (_o73.PlatformType = a.Pc);
      } else if (cc.sys.platform == cc.sys.ANDROID) {
        _o73.PlatformType = a.Android;
      } else if (c == cc.sys.BYTEDANCE_GAME) {
        _o73.PlatformType = a.TTGame;
      } else if (c == cc.sys.WECHAT_GAME) {
        _o73.PlatformType = a.WXGame;
      } else if (c == cc.sys.OPPO_GAME) {
        _o73.PlatformType = a.OPPOGame;
      } else if (window.ks) {
        _o73.PlatformType = a.KWaiGame;
      } else {
        c == cc.sys.ALIPAY_GAME && (_o73.PlatformType = a.ZFBGame);
      }
    }
  }, {
    key: "getconfig",
    value: function getconfig() {
      if (null == this._config) {
        var _e33 = _o73.eqconfig();
        if ("biligamee89b211e1a411dc4" == _e33.id) {
          this._config = {
            WXGame: {
              banner: [""],
              video: [""],
              Interstitial: ["bili-211733471076986934"],
              Custom: [""]
            }
          };
        } else if ("biligamed882a03d95ed1f52" == _e33.id) {
          this._config = {
            WXGame: {
              banner: [""],
              video: ["bili-211733471096178285"],
              Interstitial: [""],
              Custom: [""]
            }
          };
        } else if (_o73.PlatformType == a.TTGame) {
          if ("tt84def2631be94d1f02" == _e33.APPID) {
            this._config = {
              TTGame: {
                banner: [""],
                video: ["11q2gtcjmlr50983d3"],
                Interstitial: ["b35f8a58c36182ngk4"],
                Custom: [""]
              }
            };
          } else {
            "ttb417c2aa2b207df302" == _e33.APPID && (this._config = {
              TTGame: {
                banner: [""],
                video: ["41jjc17fg7b51c208g"],
                Interstitial: ["1f9h98dik4md87l4e3"],
                Custom: [""]
              }
            });
          }
        } else if (_o73.PlatformType == a.WXGame) {
          if ("wx504280e7f29e9878" == _e33.APPID) {
            let ads = Adv_skd.default.instance.getAds()
            console.log('获取广告配置config',ads)
            this._config = {
              WXGame: {
                banner: [ads.bannerId],
                video: [ads.videoAdId],
                Interstitial: [ads.interstitialId],
                Custom: [ads.GridLeftId_1]
              }
            };
          } else {
            "wxf92272a4904fc9c9" == _e33.APPID && (this._config = {
              WXGame: {
                banner: ["adunit-7416c0e18575ecaa"],
                video: ["adunit-f9f6f73f9b1b8885"],
                Interstitial: ["adunit-55c33287dffc1804"],
                Custom: ["adunit-9ec4517f86413179"] 
              }
            });
          }
        } else if (_o73.PlatformType == a.KWaiGame) {
          if ("ks668221595395926200" == _e33.APPID) {
            this._config = {
              KWaiGame: {
                banner: [""],
                video: ["2300008711_01"],
                Interstitial: ["2300008711_02"],
                Custom: [""]
              }
            };
          } else {
            "ks672443720062802220" == _e33.APPID && (this._config = {
              KWaiGame: {
                banner: ["2300013623_03"],
                video: ["2300013623_01"],
                Interstitial: ["2300013623_02"],
                Custom: [""]
              }
            });
          }
        }
      }
      return this._config;
    }
  }], [{
    key: "Instance",
    get() {
      if (null == _o73._instance) {
        _o73._instance = new _o73();
        _o73._instance.platformType();
      }
      return _o73._instance;
    }
  }, {
    key: "eqconfig",
    value: function eqconfig() {
      var e = $2PTConfig.default.getPTInfoByName();
      console.log("............配置信息............", e);
      if (e) {
        return {
          EQAPPKEY: e.EQAPPKEY,
          EQAUTH: e.EQAUTH,
          APPID: e.APPID,
          EQVERSION: e.EQVERSION,
          WTF_APPKEY: e.WTF_APPKEY,
          WFT_APPKEY: e.WTF_APPKEY
        };
      } else {
        return {};
      }
    }
  }]);
}();
def_Platformconf._instance = null;
def_Platformconf.PlatformType = a.KWaiGame;
def_Platformconf = _o73 = cc__decorate([ccp_ccclass], def_Platformconf);
exports.default = def_Platformconf;